﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Pampa.CRUD.Configuration;
using Pampa.MVC.Fluent.Crud.Groups;

namespace Pampa.MVC.Fluent.Crud.Items
{
    public class StaticComboItemBuilder<TGroup, TEditor> : EditItemBuilder<TGroup, TEditor, object, StaticComboItemBuilder<TGroup, TEditor>>
    {
        private StaticComboItem _item;

        public StaticComboItemBuilder(StaticComboItem item) : base(item)
        {
            _item = item;
        }

        public StaticComboItemBuilder(GroupBuilder<TGroup, TEditor> group, StaticComboItem item) : base(group, item)
        {
            _item = item;
        }

        public StaticComboItemBuilder<TGroup, TEditor> AddItem(string value, string text)
        {
            var newItem = new KeyValuePair<string, string>(value, text);
            _item.Items.Add(newItem);
            return this;
        }
    }
}
